package com.ymatou.c2clivebizer.testcase;


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.c2clivebizer.parameter.HomePageBean;
import com.ymatou.c2clivebizer.service.HomePageCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P3;
/**
*首页直播买手推荐前台接口
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_HomePage{
	private static HomePageBean homepageBean;
	private static HomePageCall homepageCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("直播、买手推荐前台接口");
	}

	@Before
	public void caseUp() {
		homepageBean=new HomePageBean();
		homepageCall=new HomePageCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(homepageCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_001() {
		Logger.start(true,"直播推荐-返回状态验证");
		try {

			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("id,uv,liveRecommendTitle");  //返回字段， 直播围观数，直播推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:live");//当期时间、cookieid、userid、请求类型：直播推荐
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			Logger.verifyEquals("OK", homepageCall.getStatus(), "接口返回状态ok");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_002() {
		Logger.start(true,"直播推荐-返回key值验证");
		try {
			//TODO 补全case代码
			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("id,uv,liveRecommendTitle");  //返回字段， 直播围观数，直播推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:live");//当期时间、cookieid、userid、请求类型：直播推荐
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			JSONArray hitsAry = homepageCall.getHits();
			
			for(int i=1;i<=hitsAry.length();i++){
				
			 String info = hitsAry.get(i-1).toString();
			 JSONObject infoAry = new JSONObject(info);
			 
			 //获取接口返回的key校验返回字段
			  Logger.verifyEquals(true,infoAry.has("id") , "验证第"+i+"条记录返回结果中有id这个key");
			  Logger.verifyEquals(true, infoAry.has("uv"), "验证第"+i+"条记录返回结果中有uv这个key");
			  Logger.verifyEquals(true,infoAry.has("liveRecommendTitle") , "验证第"+i+"条记录返回结果中有liveRecommendTitle这个key");
			  
			}
			 Logger.verifyEquals("OK", homepageCall.getStatus(), "接口返回状态ok");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_003() {
		Logger.start(true,"直播推荐-推荐直播结束时间检查");
		try {

			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("id,uv,liveRecommendTitle");  //返回字段， 直播围观数，直播推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:live");//当期时间、cookieid、userid、请求类型：直播推荐
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();
			
			JSONArray hitsAry = homepageCall.getHits();
			long nowTime = new Date().getTime();
			
			for (int i = 1; i <= hitsAry.length(); i++) {

				String info = hitsAry.get(i - 1).toString();
				JSONObject infoAry = new JSONObject(info);
				String times = (String) infoAry.get("endTime");

				// 将string转换成Date类型
				DateFormat time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
				Date date = time.parse(times);

				// 将时间转换成时间戳
				long endTime = date.getTime();

				Logger.verifyEquals(true, nowTime < endTime, "验证第" + i+ "条记录返回结果中推荐直播的  结束时间 大于 当前时间");

			}
				
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_004() {
		Logger.start(true, "直播推荐-返回数据重复性检查");
		try {
			// TODO 补全case代码
			// org.junit.Assert.fail();
			homepageBean.setPlatform("appbuyer");// 表示是买家app
			homepageBean.setModule("mainhome"); // 表示是主页来的请求
			homepageBean.setFl("id,uv,liveRecommendTitle"); // 返回字段，
															// 直播围观数，直播推荐标题
			homepageBean.setLimit("0,100"); // 返回条数
			homepageBean.setSort("desc(yscore)"); // 排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:live");// 当期时间、cookieid、userid、请求类型：直播推荐

			homepageCall.setData(homepageBean);
			homepageCall.callService();
			// 获取接口返回id值
			JSONArray hitsAry = homepageCall.getHits();
			
			List<Integer> list = new ArrayList<Integer>();

			for (int i = 1; i <= hitsAry.length(); i++) {

				String ids = hitsAry.get(i - 1).toString();
				JSONObject json = new JSONObject(ids);

				int id = json.getInt("id");

				if (list.contains(id) == true) {

					Logger.verifyEquals(false, list.contains(id), "验证第" + i+ "条返回数据的id存在重复值" + id);

				} else {
					Logger.verifyEquals(false, list.contains(id), "验证第" + i+ "条返回数据的id不存在重复值" + id);
					list.add(id);
				}

			}

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_005() {
		Logger.start(false,"直播推荐接口-传入不存在的返回字段验证接口是否能正常返回数据");
		try {

			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("aa,ids,uv,liveRecommendTitle");  //返回字段， 直播围观数，直播推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:live");//当期时间、cookieid、userid、请求类型：直播推荐
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			JSONArray hitsAry = homepageCall.getHits();
			
			Logger.verifyEquals("OK", homepageCall.getStatus(), "接口返回状态ok");
			Logger.verifyNotNull(hitsAry, "接口正常返回直播推荐数据");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_006() {
		Logger.start(true,"买手推荐接口-返回key值验证");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("id,sellerId,sellerRecommendTitle");  //返回字段：买手ID,买手推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:seller");//当期时间、cookieid、userid、请求类型：买手推荐
			 
			homepageCall.setData(homepageBean);
			homepageCall.callService();			
			JSONArray hitsAry = homepageCall.getHits();
			
			for(int i=0;i<hitsAry.length();i++){
			 String info = hitsAry.get(i).toString();
			 JSONObject infoAry = new JSONObject(info);
			 //获取接口返回的key校验返回字段
			 Logger.verifyEquals("OK", homepageCall.getStatus(), "接口返回状态ok");
				Logger.verifyEquals(true, infoAry.has("id"), "验证第"+i+"条记录返回结果中没有id这个key");

				Logger.verifyEquals(true, infoAry.has("sellerId"),"验证第"+i+"条记录返回结果中没有sellerId这个key");

				Logger.verifyEquals(true, infoAry.has("sellerRecommendTitle"),"验证第"+i+"条记录返回结果中没有sellerRecommendTitle这个key");

			}
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_007() {
		Logger.start(true,"买手推荐接口-直播结束时间检查");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("id,sellerId,sellerRecommendTitle");  //返回字段：买手ID,买手推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:seller");//当期时间、cookieid、userid、请求类型：买手推荐
			 
			homepageCall.setData(homepageBean);
			homepageCall.callService();
			JSONArray hitsAry = homepageCall.getHits();
			long nowTime = new Date().getTime();
			
			for(int i=1;i<=hitsAry.length();i++){
				 String info = hitsAry.get(i-1).toString();
				 JSONObject infoAry = new JSONObject(info);
				 String times =  (String) infoAry.get("endTime");
				 //将string转换成Date类型
				 DateFormat time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");         
				 Date date = time.parse(times);
				 //将时间转换成时间戳
				 long endTime = date.getTime();
				
				 Logger.verifyEquals(true,nowTime<endTime, "验证第"+i+"条记录返回结果中推荐直播的  结束时间 大于 当前时间");
			}
						
			//
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_008() {
		Logger.start(true,"买手推荐接口-返回sellerId重复性检查");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("id,sellerId,sellerRecommendTitle");  //返回字段：买手ID,买手推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160714143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:seller");//当期时间、cookieid、userid、请求类型：买手推荐
			 
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			//获取接口返回id值
			JSONArray hitsAry = homepageCall.getHits();
			List<Integer> list = new ArrayList<Integer>();
			
			for(int i=0;i<hitsAry.length();i++){
				String ids	= hitsAry.get(i).toString();
				JSONObject json = new JSONObject(ids);
				//JSONObject json=JSONObject.fromObject(ids);
				int id = json.getInt("sellerId");
				
				if (list.contains(id) == true) {

					Logger.verifyEquals(false, list.contains(id), "验证第" + i+ "条返回数据的id存在重复值" + id);

				}else{
					Logger.verifyEquals(false, list.contains(id), "验证第" + i+ "条返回数据的id不存在重复值" + id);
					list.add(id);
				}
				
			}
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_009() {
		Logger.start(false,"买手推荐接口-传入不存在的返回字段验证接口是否能正常返回数据");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("aa,ids,sellerId,sellerRecommendTitle");  //返回字段：买手ID,买手推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
			homepageBean.setInfo("timenow:20160127143200,cookieid:6500D309-609D-4CAE-8A35-50A7972361C5,userid:359223,req_type:seller");//当期时间、cookieid、userid、请求类型：买手推荐
			 
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			//获取接口返回id值
			JSONArray hitsAry = homepageCall.getHits();
			Logger.verifyEquals("OK",homepageCall.getStatus() , "传入不存在的值接口也能正常返回");
			Logger.verifyNotNull(hitsAry, "接口正常返回买手推荐数据");
		
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_010() {
		Logger.start(false,"买手推荐接口-不传入info信息");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			homepageBean.setPlatform("appbuyer");//表示是买家app
			homepageBean.setModule("mainhome"); //表示是主页来的请求
			homepageBean.setFl("aa,ids,sellerId,sellerRecommendTitle");  //返回字段：买手ID,买手推荐标题
			homepageBean.setLimit("0,100");  //返回条数
			homepageBean.setSort("desc(yscore)");  //排序
		
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			//获取接口返回id值
			JSONArray hitsAry = homepageCall.getHits();
			Logger.verifyEquals("OK",homepageCall.getStatus() , "传入不存在的值接口也能正常返回");
			Logger.verifyNotNull(hitsAry, "接口正常返回买手推荐数据");
		
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_011() {
		Logger.start(true,"直播、买手推荐后台接口-返回公共数据校验");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			//设置参数
			int sellerId = 480948; //买手ID
			String sellerName = "smile";//买手名字
			int countryGroupId = 3 ;//地区id
			int countryId = 1; //国家id
			int isReplay = 0; //是否是回播
			
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(keyword(sellerName,"+sellerName+"),term(sellerId,"+sellerId+"),term(countryGroupId,"+countryGroupId+"),term(countryId,"+countryId+"),term(isReplay,"+isReplay+")) ");//条件参数，从左到右：买手名字，买手ID， 地区id，国家id，是否是回播
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			//homepageBean.setFilter("and(range(beginTime,null,2016-02-25 16:36:00,true,true),range(endTime,2016-04-01 16:36:00,null,true,true))");//筛选参数：起始时间小于2016-01-25 16:36:00且结束时间大于2016-01-25 16:36:00
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			String status = homepageCall.getStatus();
			String took = homepageCall.getTook();
			String requestId = homepageCall.getRequestId();
			boolean timeOut = homepageCall.getTimeout();
			String hostIp = homepageCall.getHostIp();
			
			Logger.verifyEquals("OK", status, "直播、买手推荐后台接口返回公共数据状态");

			Logger.verifyNotNull(took,"验证took存在返回值");
			Logger.verifyNotNull(requestId,"验证requestId存在返回值");
			Logger.verifyNotNull(timeOut,"验证timeOut存在返回值");
			Logger.verifyNotNull(hostIp,"验证hostIp存在返回值");
			Logger.verifyNotNull(status,"验证status存在返回值");			

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_012() {
		Logger.start(true,"直播、买手推荐后台-按sellerid条件搜索，校验返回数据");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			//设置参数
			int sellerId = 20227567; //买手ID
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(sellerId,"+sellerId+"))");//条件参数，从左到右：买手名字
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			//homepageBean.setFilter("and(range(beginTime,null,2016-02-25 16:36:00,true,true),range(endTime,2016-04-01 16:36:00,null,true,true))");//筛选参数：起始时间小于2016-01-25 16:36:00且结束时间大于2016-01-25 16:36:00
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			Logger.debug(homepageCall.getHits());
			/*JSONArray hits = homepageCall.getHits();
			int errId = 0;
			// 获取接口返回数据中的所有sellerid值
			for (int i = 1; i <= hits.length(); i++) {
				String hitsOne = hits.getString(i-1);
				JSONObject hitsOnes = new JSONObject(hitsOne);
				int uid = (Integer) hitsOnes.get("sellerId");
				Logger.verifyEquals(sellerId, uid, "用户id为：" + uid + "的直播不满足条件不应该搜出");
				
			}*/
			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
		
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_013() {
		Logger.start(true,"直播、买手推荐后台接口-按sellerName条件搜索，校验返回数据");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			//设置参数
			String sellerName = "sj014";//买手名字
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(keyword(sellerName,"+sellerName+"))");//条件参数，从左到右：买手名字
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			//homepageBean.setFilter("and(range(beginTime,null,2016-02-25 16:36:00,true,true),range(endTime,2016-04-01 16:36:00,null,true,true))");//筛选参数：起始时间小于2016-01-25 16:36:00且结束时间大于2016-01-25 16:36:00
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			JSONArray hits = homepageCall.getHits();
			
			// 获取接口返回数据中的所有sellerid值
			for (int i = 1; i <= hits.length(); i++) {
				String hitsOne = hits.getString(i-1);
				JSONObject hitsOnes = new JSONObject(hitsOne);
				String name =  (String) hitsOnes.get("sellerName");
				
				Logger.verifyIsContains(sellerName, name, "第"+i+"条记录中sellerName=" + name + "的直播匹配结果");
			}
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
		
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_014() {
		Logger.start(false,"直播、买手推荐后台接口-传入一个不存在的返回值");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			//设置参数
			String sellerName = "smile";//买手名字
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(keyword(sellerName,smile)) ");//条件参数，从左到右：买手名字
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			//homepageBean.setFilter("and(range(beginTime,null,2016-02-25 16:36:00,true,true),range(endTime,2016-04-01 16:36:00,null,true,true))");//筛选参数：起始时间小于2016-01-25 16:36:00且结束时间大于2016-01-25 16:36:00
			//返回字段：aaaaa 是不存在的
			homepageBean.setFl("aaaaa,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			JSONArray hits = homepageCall.getHits();
			
			Logger.verifyEquals("OK", homepageCall.getStatus(), "接口返回状态ok");
			Logger.verifyEquals(true, hits.length()>0, "验证接口是否有返回数据");
			
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
		
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_015() {
		Logger.start(false,"直播、买手推荐后台接口-将来源和模块设为空值");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			//设置参数
			String sellerName = "smile";//买手名字
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform(" ");//表示是买家app
			homepageBean.setModule(" "); //表示是后台请求
			homepageBean.setQuery("and(keyword(sellerName,smile)) ");//条件参数，从左到右：买手名字
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			//homepageBean.setFilter("and(range(beginTime,null,2016-02-25 16:36:00,true,true),range(endTime,2016-04-01 16:36:00,null,true,true))");//筛选参数：起始时间小于2016-01-25 16:36:00且结束时间大于2016-01-25 16:36:00
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			JSONArray hits = homepageCall.getHits();
			
			Logger.verifyEquals("OK", homepageCall.getStatus(), "接口返回状态ok");
			Logger.verifyEquals(true, hits.length()>0, "验证接口是否有返回数据");
			
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	} 
	

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_016() {
		Logger.start(false,"直播、买手推荐后台接口-检索条件传入不存在的时间值 ");
		try {
			//TODO 补全case代码
			//org.junit.Assert.fail();
			//设置参数
			String sellerName = "Miao01";//买手名字
			String beginTime = "2016-02-30 16:36:00";//该时间值是不存在的
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform(" ");//表示是买家app
			homepageBean.setModule(" "); //表示是后台请求
			homepageBean.setQuery("and(keyword(sellerName,"+sellerName+"))");//条件参数，从左到右：买手名字
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			//homepageBean.setFilter("and(range(beginTime,null,2016-02-25 16:36:00,true,true),range(endTime,2016-04-01 16:36:00,null,true,true))");//筛选参数：起始时间小于2016-01-25 16:36:00且结束时间大于2016-01-25 16:36:00
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			JSONArray hits = homepageCall.getHits();
			
			Logger.verifyEquals("OK", homepageCall.getStatus(), "验证检索条件数据异常情况下接口能都正常返回状态");

			
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_017() {
		Logger.start(false,"直播、买手推荐后台接口-过滤条件传入不存在的用户id 验证接口返回数据");
		try {
			//设置参数
			String sellerId = "10101010"; //不存在的买手ID
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(sellerId,"+sellerId+"))");//条件参数，从左到右：买手id
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			Logger.verifyIsNull(homepageCall.getHits(), "接口返回值为null");
			Logger.verifyEquals("OK", homepageCall.getStatus(), "验证检索条件数据异常情况下接口能都正常返回状态");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_018() {
		Logger.start(true,"直播、买手推荐后台接口-增加大洲过滤， 验证接口返回数据");
		try {
			//设置参数
			int countryGroupId = 3; //亚洲
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(countryGroupId,"+countryGroupId+"))");//条件参数
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			JSONArray hits = homepageCall.getHits();
	
			for(int i = 1;i<=hits.length();i++){
				String list = hits.get(i-1).toString();
				JSONObject hitObject = new JSONObject(list);
				int zid = (Integer) hitObject.get("countryGroupId");
				String zname = hitObject.getString("countryGroupName");
				
				if(countryGroupId == zid){
					Logger.verifyEquals(countryGroupId, zid, "第"+i+"条记录countryGroupId="+zid+"正常返回");
				}else {
					Logger.verifyEquals(countryGroupId, zid, "第"+i+"条记录countryGroupId="+zid+"不应该被返回");
				}
				
				if(zname == "亚洲"){
					Logger.verifyEquals("亚洲", zname, "第"+i+"条记录countryGroupName="+zname+"正常返回");
				}else{
					Logger.verifyEquals("亚洲", zname, "第"+i+"条记录countryGroupName="+zname+"不应该被返回");
				}
			}
			

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_019() {
		Logger.start(false,"直播、买手推荐后台接口-传一个不存在的州id， 验证接口返回数据");
		try {
			//设置参数
			int countryGroupId = 100; //不存在的州id
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(countryGroupId,"+countryGroupId+"))");//条件参数，从左到右：买手id
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			Logger.verifyIsNull(homepageCall.getHits(), "接口返回值为null");
			Logger.verifyEquals("OK", homepageCall.getStatus(), "验证检索条件数据异常情况下接口能都正常返回状态");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	//验证检索条件countryId
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_020() {
		Logger.start(true,"直播、买手推荐后台接口-增加国家过滤， 验证接口返回数据");
		try {
			//设置参数
			int countryId = 4; //新西兰
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(countryId,"+countryId+"))");//条件参数，从左到右：买手id
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryId,countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			//获取接口返回数据
			JSONArray hits = homepageCall.getHits();
	
			for(int i = 1;i<=hits.length();i++){
				String list = hits.get(i-1).toString();
				JSONObject hitObject = new JSONObject(list);
				int cid = (Integer) hitObject.get("countryId");
				String cname = hitObject.getString("countryNameZh");
				
				if (countryId == cid) {
					Logger.verifyEquals(countryId, cid, "第"+i+"条记录countryId="+cid+"正常返回");
				}else {
					Logger.verifyEquals(countryId, cid, "第"+i+"条记录countryId="+cid+"不应该被返回");
				}
				
				if(cname == "新西兰"){
					Logger.verifyEquals("新西兰", cname, "第"+i+"条记录countryNameZh="+cname+"正常返回");
				}else{
					Logger.verifyEquals("新西兰", cname, "第"+i+"条记录countryGroupName="+cname+"不应该被返回");
				}
				
			}
			

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_021() {
		Logger.start(false,"直播、买手推荐后台接口-传一个不存在的国家id， 验证接口返回数据");
		try {
			//设置参数
			int countryId = 1; //日本
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(countryId,"+countryId+"))");//条件参数，从左到右：买手id
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			Logger.verifyIsNull(homepageCall.getHits(), "接口返回值为null");
			Logger.verifyEquals("OK", homepageCall.getStatus(), "验证检索条件数据异常情况下接口能都正常返回状态");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_022() {
		Logger.start(false,"直播、买手推荐后台接口-传一个州和国家不对应的值， 验证接口返回数据");
		try {
			//设置参数
			int countryGroupId = 3;//亚洲
			int countryId = 6; //意大利
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(countryGroupId,"+countryGroupId+"),term(countryId,"+countryId+"))");//条件参数，从左到右：买手id
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			Logger.verifyIsNull(homepageCall.getHits(), "接口返回值为null");
			Logger.verifyEquals("OK", homepageCall.getStatus(), "验证检索条件数据异常情况下接口能都正常返回状态");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_023() {
		Logger.start(true,"直播、买手推荐后台接口-添加直播类型过滤， 验证接口返回数据");
		try {
			//设置参数
			int isReplay = 0;
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(isReplay,"+isReplay+"))");//条件参数
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			for(int i=1;i<=homepageCall.getHits().length();i++){
				String list = homepageCall.getHits().get(i-1).toString();
				JSONObject hitArr = new JSONObject(list);
				int replay = (Integer) hitArr.get("isReplay");
				Logger.verifyEquals(0, replay, "检查第"+i+"条记录是否为直播数据");
			}
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_024() {
		Logger.start(false,"直播、买手推荐后台接口-添加不存在的直播类型过滤， 验证接口返回数据");
		try {
			//设置参数
			int isReplay = 11;//该直播类型不存在
			String beginTime = "2016-02-25 16:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-09 16:36:00"; //结束时间大于2016-09-09 16:36:00
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(isReplay,"+isReplay+"))");//条件参数
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			Logger.verifyIsNull(homepageCall.getHits(), "接口返回值为null");
			Logger.verifyEquals("OK", homepageCall.getStatus(), "验证检索条件数据异常情况下接口能都正常返回状态");
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_025() {
		Logger.start(true,"直播、买手推荐后台接口-添加时间过滤， 验证接口返回数据");
		try {
			//设置参数
			int isReplay = 0;
			String beginTime = "2016-04-07 23:36:00";//起始时间小于2016-02-25 16:36:00
			String endTime = "2016-09-08 23:59:00"; //结束时间大于2016-09-09 16:36:00
			DateFormat time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");        
			Date bDate = time.parse(beginTime);
			Date eDate = time.parse(endTime);
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(term(isReplay,"+isReplay+"))");//条件参数
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryId,countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			for(int i=1;i<=homepageCall.getHits().length();i++){
				String list = homepageCall.getHits().get(i-1).toString();
				JSONObject hitArr = new JSONObject(list);
				
				String begintime =  (String) hitArr.get("beginTime");
				String endtime = (String) hitArr.get("endTime");
				Date btime = time.parse(begintime);
				Date etime = time.parse(endTime);
				
				if(btime.getTime()>=bDate.getTime()){
					Logger.verifyEquals(true, btime.getTime()>bDate.getTime(), "验证第"+i+"条记录beginTime符合检索要求");
				}else{
					Logger.verifyEquals(true, btime.getTime()>bDate.getTime(), "验证第"+i+"条记录beginTime不符合检索要求，不应该查出");
				}
				
				if(etime.getTime()<=eDate.getTime()){
					Logger.verifyEquals(true, etime.getTime()<=eDate.getTime(), "验证第"+i+"条记录endTime符合检索要求");
				}else{
					Logger.verifyEquals(true, etime.getTime()<=eDate.getTime(), "验证第"+i+"条记录endTime超出检索时间范围，不应该查出");
				}
			}
		
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_026() {
		Logger.start(true,"直播、买手推荐后台接口-同时添加所有过滤条件， 验证接口返回数据");
		try {
			//设置参数
			int isReplay = 0;
			String beginTime = "2016-02-07 23:36:00";
			String endTime = "2016-09-08 23:59:00"; 
			int sellerId = 20225311; //买手ID
			String sellerName = "sj014";//买手名字
			int countryGroupId=3;
			int countryId =2;
			
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(keyword(sellerName,"+sellerName+"),term(sellerId,"+sellerId+"),term(countryGroupId,"+countryGroupId+"),term(countryId,"+countryId+"),term(isReplay,"+isReplay+"))");//条件参数
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryId,countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			for(int i = 1;i<=homepageCall.getHits().length();i++){
				String list = homepageCall.getHits().get(i-1).toString();
				JSONObject hitArr = new JSONObject(list);
				
				int paly = (Integer) hitArr.get("isReplay");
				int sid = (Integer) hitArr.get("sellerId");
				String sname = (String) hitArr.get("sellerName");
				int gid = (Integer) hitArr.get("countryGroupId");
				int cid = (Integer) hitArr.get("countryId");
				
				Logger.verifyEquals(isReplay, paly, "检查第"+i+"条记录的isReplay值");
				Logger.verifyEquals(sellerId, sid,  "检查第"+i+"条记录的sellerId值");
				Logger.verifyEquals(countryGroupId, gid,  "检查第"+i+"条记录的countryGroupId值");
				Logger.verifyEquals(countryId, cid,  "检查第"+i+"条记录的countryId值");
				Logger.verifyIsContains(sellerName, sname, "检查第"+i+"条记录的sellerName值");
				
			}
				
				
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_HomePage_027() {
		Logger.start(false,"直播、买手推荐后台接口-添加的买手id和买手名不对应的过滤条件， 验证接口返回数据");
		try {
			//设置参数
			int isReplay = 0;
			String beginTime = "2016-02-07 23:36:00";
			String endTime = "2016-09-08 23:59:00"; 
			int sellerId = 20001501; //买手ID
			String sellerName = "smile";//买手名字
			int countryGroupId=3;
			int countryId =1;
			
			
			homepageBean.setPlatform("pc");//表示是买家app
			homepageBean.setModule("appadmin"); //表示是后台请求
			homepageBean.setQuery("and(keyword(sellerName,"+sellerName+"),term(sellerId,"+sellerId+"),term(countryGroupId,"+countryGroupId+"),term(countryId,"+countryId+"),term(isReplay,"+isReplay+"))");//条件参数
			homepageBean.setFilter("and(range(beginTime,"+beginTime+",null,true,true),range(endTime,null,"+endTime+",true,true))");
			
			//返回字段：品类，国家，地区，买手id，是否回播，起始时间，结束时间，买手名字，添加时间，直播介绍，直播品牌，参加活动id，地址，直播名称
			homepageBean.setFl("countryId,countryGroupId,categoryNames,countryNameZh,countryGroupName,sellerId,isReplay,beginTime,endTime,sellerName,addTime,content,brands,liveActivityId,location,activityName");  
			homepageBean.setLimit("0,10");  //返回条数
			homepageCall.setData(homepageBean);
			homepageCall.callService();	
			
			Logger.verifyIsNull(homepageCall.getHits(), "接口返回值为null");
			Logger.verifyEquals("OK", homepageCall.getStatus(), "验证检索条件数据异常情况下接口能都正常返回状态");
				
				
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
}